<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
  <meta charset="UTF-8">
  <title>Blog</title>
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
  <link rel="shortcut icon" type="image/x-icon" href="/img/favicon.ico?v=5.1.1">

  <link href="/css/tumo.min.css" rel="stylesheet" type="text/css">
  <link rel="stylesheet" href="/js/vue/element-ui/lib/theme-chalk/index.css">
</head>

<style>
  .link_text{
    color: #00ce0d;
  }
  p{
    color: #c7d4e1;
  }
  .c{
    margin: 10px ;
  }
</style>
<body>
<div class="container sidebar-position-left page-home">
  <div th:replace="layout/header"></div>

  <main id="app" class="main">
    <div class="main-inner">
      <div th:each="article : ${data}" class="c">
        <div class="article-box">
          <h2 th:text="${article.title}"></h2> <!-- 显示文章标题 -->
          <p th:text="'Posted on' +${#dates.format(article.createTime, 'yyyy-MM-dd HH:mm:ss')}"></p> <!-- 显示创建时间 -->
          <a th:href="@{'/p/' + ${article.id}}" class="link_text">Read More >></a> <!-- 创建点击按钮并跳转到文章页面 -->
        </div>
        <hr>
      </div>
      <div th:replace="layout/aside"></div>
    </div>
  </main>
  <div th:replace="layout/footer"></div>
</div>
<script src="/js/tumo.min.js"></script>
<script src="/js/vue/vue.min.js"></script>
<script src="/js/vue/vue-resource.min.js"></script>
<script src="/js/vue/element-ui/lib/index.js"></script>
</body>
</html>
